package com.paradox.aggregation.provider.dubbo;

import com.paradox.aggregation.providerAPI.api.DubboTestService;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Service;

import java.util.concurrent.CompletableFuture;

@DubboService(version = "async")
public class AsyncDubboTestService implements DubboTestService {
    @Override
    public CompletableFuture<String> getSource(String arg) {
        return CompletableFuture.supplyAsync(() -> {
            return "async:"+arg;
        });
    }
}
